package com.aaa.controller.api;


import com.aaa.util.EmailUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @BelongsPackage: com.aaa.email.controller
 * @Description:
 * @CreateTime: 2023-04-03  18:46
 * @Author: ql
 */
@RestController
@RequestMapping("/system/api/email")
public class SeeEmail {
    @Autowired
    private EmailUtil emailUtil;
    @GetMapping("/s")
    public void send(){
        // 测试文本邮件发送（无附件）
        String to = "804955962@qq.com"; // 这是个假邮箱，写成你自己的邮箱地址就可以
        String title = "文本邮件发送测试";
        String content = "文本邮件发送测试";
        emailUtil.sendMessage(to, title, content);
    }
    @GetMapping("/s1")
    public String send1(){
     return "admin";
    }
}
